<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org" lang="zh-CN">
<html lang="en" style="height: 100%">
<head>
    <title >hhh</title>
    <meta charset="UTF-8">

    <!-- 收藏用logo图标 -->
<!--    <link rel="bookmark"  type="image/x-icon"  th:href="@{/favicon.ico}"/>-->
    <!-- 网站显示页logo图标 -->
    <link rel="shortcut icon" th:href="@{/static/favicon.ico}">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">

    <script type="text/javascript" th:src="@{/static/js/jquery-2.1.3.min.js}"></script>
    <link rel="stylesheet" type="text/css" th:href="@{/static/css/bootstrap.min.css}"/>
    <script type="text/javascript" th:src="@{/static/js/bootstrap.min.js}"></script>
    <script type="text/javascript" th:src="@{/static/js/codehandle.js}"></script>
    <style type="text/css">
        .floating-button2 {
            display: block;
            width: 58px;
            height: 58px;
            border-radius: 50%;
            background: #f44336;
            color: #fff;
            margin: 0 auto;
            text-align: center;
            float: right;
            /* background-color: #fff; */
            position: fixed;
            top: 40px;
            /*bottom: 20px;*/
            right: 250px;
            /* border: 0 solid #fff; */
            /* border-radius: 500px; */
            box-shadow: 4px 1px 1px #ccc;
            opacity: 0.6;
            z-index: 999;
            display: -webkit-box;
            display: -ms-flexbox;
            display: -webkit-flex;
            display: flex;
            -webkit-box-align: center;
            -ms-flex-align: center;
            -webkit-align-items: center;
            align-items: center;
            -webkit-box-pack: center;
            -ms-flex-pack: center;
            -webkit-justify-content: center;
            justify-content: center;
        }
        html,body{
            height:100%;
            width:100%;

        }
    </style>

</head>
<body>
<!--<button type="button" class="floating-button2" id="getSignature">获取签名</button>-->
    <div id="placeholder" class="nav" style="width: 100%; height: 100%"></div>
    <script type="text/javascript" src="http://192.168.2.156:8089/web-apps/apps/api/documents/api.js"></script>
    <script th:inline="javascript">
        initDoc()
        function initDoc() {
            let config = {
                "type": "desktop",
                "width": "100%",
                "height": "100%",
                "documentType": "word",
                // "token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJleHAiOjE2NzY5Njc4OTEsInVzZXJuYW1lIjoiYWRtaW4ifQ.XriKzVHjUromNCX-ZpPU_D_6F79EAjTXrZCLuglqTrc",
                "document": {
                    "fileType": "docx",//文档类型
                    "key": "Khirz6zTPdfd713222512",//定义用于服务识别文档的唯一文档标识符。每次编辑和保存文档时，都必须重新生成密钥。长度限制为128个符号。
                    "title": "测试文档.doc",//为查看或编辑的文档定义所需的文件名，该文件名也将在下载文档时用作文件名。长度限制为128个符号。
                    "url": "http://192.168.2.156:9030/jeecg-boot/diskettes/common/onlyOfficeFileDownload?fileId=1625767347011829762",//定义存储原始查看或编辑的文档的绝对URL
                    // "url":"http://192.168.2.156:8099/王先康_加班表.docx"
                },
                "editorConfig":{
                    "lang": "zh-CN",//语言环境 en:英语 zh-CN：中文
                    "mode": "view",//文档操作模式 view 视图模式不可编辑  edit 编辑模式可编辑文档
                    "customization":{
                        "zoom": 100,
                    },
                },
            };
            console.log("config",config)
            let docEditor = new DocsAPI.DocEditor("placeholder", config);
        }


    </script>
</body>
</html>